using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_ICTeamTimeMap : EntityTypeConfiguration<t_ICTeamTime>
    {
        public t_ICTeamTimeMap()
        {
            // Primary Key
            this.HasKey(t => t.FID);

            // Properties
            this.Property(t => t.FID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FBillNo)
                .IsRequired()
                .HasMaxLength(30);

            this.Property(t => t.FName)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.FNote)
                .IsRequired()
                .HasMaxLength(300);

            // Table & Column Mappings
            this.ToTable("t_ICTeamTime");
            this.Property(t => t.UUID).HasColumnName("UUID");
            this.Property(t => t.FID).HasColumnName("FID");
            this.Property(t => t.FClassTypeID).HasColumnName("FClassTypeID");
            this.Property(t => t.FBillNo).HasColumnName("FBillNo");
            this.Property(t => t.FBiller).HasColumnName("FBiller");
            this.Property(t => t.FDate).HasColumnName("FDate");
            this.Property(t => t.FAllHours).HasColumnName("FAllHours");
            this.Property(t => t.FName).HasColumnName("FName");
            this.Property(t => t.FNote).HasColumnName("FNote");
        }
    }
}
